package com.mycloud.cloud.order.service.impl;

import java.util.List;

import com.mycloud.cloud.order.dao.PmsCategoryMapper;
import com.mycloud.cloud.order.entity.PmsCategory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mycloud.cloud.order.service.IPmsCategoryService;

/**
 * 商品三级分类Service业务层处理
 *
 * @author ruoyi
 * @date 2020-09-09
 */
@Service
public class PmsCategoryServiceImpl implements IPmsCategoryService {
    @Autowired
    private PmsCategoryMapper pmsCategoryMapper;

    /**
     * 查询商品三级分类
     *
     * @param id 商品三级分类ID
     * @return 商品三级分类
     */
    @Override
    public PmsCategory selectPmsCategoryById(Long id) {
        return pmsCategoryMapper.selectPmsCategoryById(id);
    }

    /**
     * 查询商品三级分类列表
     *
     * @param pmsCategory 商品三级分类
     * @return 商品三级分类
     */
    @Override
    public List<PmsCategory> selectPmsCategoryList(PmsCategory pmsCategory) {
        return pmsCategoryMapper.selectPmsCategoryList(pmsCategory);
    }

    /**
     * 新增商品三级分类
     *
     * @param pmsCategory 商品三级分类
     * @return 结果
     */
    @Override
    public int insertPmsCategory(PmsCategory pmsCategory) {
        return pmsCategoryMapper.insertPmsCategory(pmsCategory);
    }

    /**
     * 修改商品三级分类
     *
     * @param pmsCategory 商品三级分类
     * @return 结果
     */
    @Override
    public int updatePmsCategory(PmsCategory pmsCategory) {
        return pmsCategoryMapper.updatePmsCategory(pmsCategory);
    }

    /**
     * 批量删除商品三级分类
     *
     * @param ids 需要删除的商品三级分类ID
     * @return 结果
     */
    @Override
    public int deletePmsCategoryByIds(Long[] ids) {
        return pmsCategoryMapper.deletePmsCategoryByIds(ids);
    }

    /**
     * 删除商品三级分类信息
     *
     * @param id 商品三级分类ID
     * @return 结果
     */
    @Override
    public int deletePmsCategoryById(Long id) {
        return pmsCategoryMapper.deletePmsCategoryById(id);
    }
}
